fix(scan): consistent page padding + real block cadence#106
Merged
Conversation
The block time stat read the chain-performance bucket average, which is windowed by the selected range and inflated by past stalls: it showed ~1.8s on the 1h bucket while testnet was producing ~0.5s blocks. Compute it from the latest blocks instead, falling back to the perf value only when there are not enough blocks to measure.
Most pages used px-4 (16px) with no responsive bump, tighter than the header (px-4 lg:px-6) so content sat 8px left of the navbar on large screens. A second class of pages (EVM/native rail, forks, api-docs, contracts, mempool, epochs, supply) rendered a bare space-y-6 root with no max-width container at all, so content ran flush to the screen edges. Standardise every page-edge container to px-5 sm:px-6 lg:px-8 (20/24/32px) and wrap the bare pages in the same container.
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughHomeContent now computes blockTime from recent blocks when at least two blocks are available, otherwise it falls back to Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes. The block cadence commit re-lands the change from #105, which was lost: #105 merged into the #104 branch after #104 had already squash-merged to main, so it never reached main.
Page padding
Most pages used px-4 (16px) with no responsive bump, tighter than the header (px-4 lg:px-6), so content sat 8px left of the navbar on large screens. A second class of pages (EVM/native rail, forks, api-docs, contracts, mempool, epochs, supply) rendered a bare space-y-6 root with no max-width container at all, so content ran flush to the screen edges. Standardised every page-edge container to px-5 sm:px-6 lg:px-8 (20/24/32px) and wrapped the bare pages in the same container. Verified on testnet: EVM rail content now has 20px side padding on mobile and is properly centered on desktop, instead of running edge to edge.
Block cadence
The Block Time stat read the chain-performance bucket average, which is windowed by range and inflated by past stalls (showed ~1.8s on a 1h bucket while testnet produced ~0.5s blocks). Computes it from recent block timestamps instead (now ~556ms on testnet). The target 1s subline is unchanged.
Testing: typecheck and build pass.
Summary by CodeRabbit
Copy
Also swept the em dashes from the EVM and native rail explainer text (colons, periods, commas).